/**
 * @file 数据库连接工具类
 * @version 1.0.0
 * @author qingxue
 * @createDate 2024-04-06 20:00
 * @updateDate 2024-04-06 20:00
 */

const { Sequelize } = require('sequelize');
const { dbConfig } = require('@/config/db.config');
const { database, user, password, options } = dbConfig;

// 使用 sequelize 模块配置和数据库的连接信息，创建连接数据库的对象
// new Sequelize('数据库名','用户名','密码',{ 配置信息 })
const mysql_Sequelize = new Sequelize(database, user, password, options);

// 导出数据库的连接对象
module.exports = mysql_Sequelize;
